import requests
import os

json_data = [
    {"name": "分集水器.svg", "type": "file", "mtime": "Mon, 05 Feb 2024 07:30:30 GMT", "size": 37612},
    {"name": "加药泵.svg", "type": "file", "mtime": "Mon, 05 Feb 2024 07:30:30 GMT", "size": 34746},
    # 其他元素
]

url_prefix = "https://2d.le5le.com/png/2.5D-%E5%BA%9F%E6%B0%B4%E5%A4%84%E7%90%86/"

for item in json_data:
    download_url = url_prefix + item["name"]
    response = requests.get(download_url)
    if response.status_code == 200:
        with open(item["name"], "wb") as file:
            file.write(response.content)
    else:
        print(f"下载 {item['name']} 失败，状态码：{response.status_code}")